﻿/*
 * 由SharpDevelop创建。
 * 用户： abc
 * 日期: 2013/6/29
 * 时间: 14:29
 *
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */

using System;
using System.Windows.Forms;

namespace myProxy
{
    /// <summary>
    /// Description of MainForm.
    /// </summary>
    public partial class MainForm : CCWin.Skin_Metro
    {
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            Control.CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }

        private void MainFormLoad(object sender, EventArgs e)
        {
            //设置第一列为可编辑状态
            listView1.LabelEdit = true;
        }

        private void ListView1SelectedIndexChanged(object sender, EventArgs e)
        {
        }

        private void listView1_Click(object sender, EventArgs e)
        {
        }

        private void exitskinButton_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);
        }

        private void copy_skinButton_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection lists = listView1.SelectedItems;
            string result = "";
            if (lists.Count == 0)
                return;
            foreach (ListViewItem l in lists)
            {
                result += l.SubItems[0].Text + ":" + l.SubItems[1].Text + '\n';
            }
            result = result.Remove(result.Length - 1); /*去掉最后个文化换行符*/
            Clipboard.SetDataObject(result);
            if (lists.Count > 0)
                MessageBox.Show("复制成功");
        }
    }
}